package com.eastcom.providor.dao;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.eastcom.bm.atom.Atom_DatasetDefine;
import com.eastcom.bm.atom.DataSetStatiBean;
import com.eastcom.client.DataSetStateBean;
import com.eastcom.client.KpiStateBean;
import com.eastcom.client.NeTypeDataSetBean;
import com.eastcom.client.NeTypeDataSetStatiBean;

public interface IDataSetDao {

	public Map<Object,Map> selectDimensionNumByParamsFromSource(String dataSetId, Date start,Date end) throws Exception ;
	
	public int selectDimensionNumByParamsFromSource(String dataSetId,Date dataTime)throws Exception;
	
	public Map<Object,Map> selectDimensionNumByParamsFromSource(String dataSetId, List<Date> dataTimes) throws Exception;
	
	public String selectDataValueByParamsFromSource(String dataSetId,String kpiId,String dimension,Date dataTime)throws Exception;
	
	public List selectHistoryDataValueByParamsFromSource(String dataSetId, String kpiId, String dimension, Date dataTime)throws Exception;
	
	public Map<String, Object> findDataSetIntegerDescByParam(String dataSetId,Date timeStamp)throws Exception;
	
	public Atom_DatasetDefine findById(String dataSetId,boolean initialKpis)throws Exception;
	
	public List<NeTypeDataSetBean> selectDataSetStateWithLastTimeStampDistinguishByNeType(String attentionType) throws Exception;
	
	public List<DataSetStateBean> selectDataSetStateByTimeStamp(String dataSetId,long startTime,long endTime) throws Exception;
	
	public List<KpiStateBean> selectKpiStateByDataSetIdAndTimeStamp(String dataSetId,Date timeStamp) throws Exception;
	
	public List<NeTypeDataSetStatiBean> selectAllDataSetStatiBean() throws Exception;
	
	public List<NeTypeDataSetStatiBean> selectDataSetStatiBeanByNeType(String neType,int span, String spanType) throws Exception;
	
	public List<Atom_DatasetDefine> getAllDataSetDefine()throws Exception;

	public List<Atom_DatasetDefine> selectDatasetDefineByNeTypeAndCName(String name,String neType,boolean initialKpis) throws Exception;

	public void saveDatasetDefine(Atom_DatasetDefine datasetDefine) throws Exception;

	public void updateDatasetDefine(Atom_DatasetDefine datasetDefine) throws Exception;
	
	public void delDatasetByID(String datasetID) throws Exception;
	
	public void delDatasetByDatasetIDs(List<String> datasetIDs) throws Exception;
	
	public String generateCollectSql(Atom_DatasetDefine dataSetDefine);
	
	public List<DataSetStatiBean> selectDataSetStatiBean(Date startDate, Date endDate) throws Exception ;
	
	public List<DataSetStatiBean> selectDataSetStatiBean(Date startDate,Date endDate,int dayCount)throws Exception;
	
	public List<DataSetStatiBean> selectDataSetStatiBeanWithDayGranu(String datasetId,Date startDate, Date endDate) throws Exception ;
	
	public List<String> selectAllDatasetId() throws Exception;
	
	public List<DataSetStatiBean> selectAllDataSetStatiBeanWithDayGranuByTable(Date startDate, Date endDate) throws Exception;
	
	public int collectData(String dataset_id, List<Date> dates) throws Exception;
	
	public void removeDataSetStatisByParam(String dataSetId,Date startDate,Date endDate) throws Exception;
	
	public void saveDataSetStatisByJdbc(List<DataSetStatiBean> dataSetStatises) throws Exception;
	
	public List<String> selectDimensionsFromSource(String dataset_id,Date date) throws Exception;
	
	public List<String> currentDimensionList(String dataset_id,Date time);
	//public List<TreeNode> getAllDatasetNode(String id)throws Exception;
    //public boolean isDatasetExist(String dataset_id);
    //public Map<String,Atom_DatasetDefine> getAllDataSetDefineMap()throws Exception;
}
